﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Defaults.cshtml";
}
 <div ng-app="app" ng-controller="DemoCtrl">                
      <a class="btn btn-info" ng-click="appDialog(false,null)">
										<i class="glyphicon glyphicon-plus icon-white"></i>  
										Thêm mới                                           
	</a>
          
     <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <tr>
                <th>
                     <a href="#" ng-click="orderByField='tENGL'; reverseSort = !reverseSort">
                        Tên Giáo Lý <span ng-show="orderByField == 'tENGL'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
                    </a>
                </th>
                <th></th>
            </tr>
            <tr ng-repeat="task in tasks |orderBy:orderByField:reverseSort">
                <td> {{task.tENGL}}</td>
                <td class="center">                    
                    <div ng-show="showEdit()">
                                <a class="btn btn-info" ng-click="appDialog(true,task)">
										<i class="icon-edit icon-white"></i>  
										Sửa                                            
									</a>
                            </div>
                                <div ng-show="showDelete()">
									<a class="btn btn-danger" ng-click="delete(task.iD)">
										<i class="icon-trash icon-white"></i> 
										Xóa
									</a>
                             </div>
                </td>                    
            </tr>
        </table>

        <div ng-controller="DialogCtrl">
            <jqdialog dialog-name="Application" title="'Giáo Lý'"
                      auto-open="false" width="400" height="300"
                      on-open="onOpen" buttons="{'Lưu': onOk, 'Hủy': onCancel, 'Đóng': 'close' }"
                      args-to-scope="true"
                      before-close="beforeClose">
                <h3>Thông tin</h3>
                <label for="tENGL">Tên :</label>
                <input id="tENGL" ng-model="obj.tENGL"/><br/>
                {{ obj.tENGL }}
            </jqdialog>
        </div>

 </div>
<script src="~/Content/lib/jquery-1.8.3.js"></script>
<script src="~/Content/lib/jquery-ui.js"></script>
<script src="~/Content/lib/angular.js"></script>
<script src="~/Content/lib/module.js"></script>
<script src="~/Content/js/jqdialog/jqdialog.js"></script>
<script src="~/Content/md/gl/gl.js"></script>
<script>
    $("#dscv").html("Danh Sách Giáo Lý");
</script>